﻿using System.Windows.Forms;

namespace FTTXImportUtility.Utility
{
    static class FormUtility
    {
        public static void ShowMessage(this Form form, string message, string caption)
        {
            MessageBox.Show(form, message, caption);
        }

        public static void ShowMessageError(this Form form, string message, string caption)
        {
            MessageBox.Show(form, message, caption,MessageBoxButtons.OK, MessageBoxIcon.Error);
        }

        public static void ShowMessageError(this Form form, string message)
        {
            MessageBox.Show(form, message, form.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
        }

        public static void ShowMessageInformation(this Form form, string message, string caption)
        {
            MessageBox.Show(form, message, caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

        public static void ShowMessageInformation(this Form form, string message)
        {
            MessageBox.Show(form, message, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

        public static DialogResult ShowMessageRequest(this Form form, string message)
        {
          return MessageBox.Show(form, message, "Request decision", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
        }
    }
}
